|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnegotiator.Agent
agents.anac.y2011.Nice_Tit_for_Tat.BilateralAgent
agents.anac.y2011.Nice_Tit_for_Tat.NiceTitForTat
public class NiceTitForTat
Tit for tat agent with opponent learning
| Field Summary |
|---|
| Fields inherited from class agents.anac.y2011.Nice_Tit_for_Tat.BilateralAgent |
|---|
domain, myHistory, opponentHistory |
| Fields inherited from class negotiator.Agent |
|---|
fNegotiation, parametervalues, sessionNr, sessionsTotal, startTime, strategyParameters, timeline, totalTime, utilitySpace |
| Constructor Summary | |
|---|---|
NiceTitForTat()
|
|
| Method Summary | |
|---|---|
Bid |
chooseCounterBid()
The opponent has already made a bid. |
Bid |
chooseFirstCounterBid()
Use this method to make the first counter-bid. |
Bid |
chooseOpeningBid()
Use this method to make an opening bid. |
java.lang.String |
getName()
|
static java.lang.String |
getVersion()
|
void |
init()
This method is called by the protocol every time before starting a new session after the internalInit method is called. |
boolean |
isAcceptable(Bid plannedBid)
At some point, one of the parties has to accept an offer to end the negotiation. |
protected static void |
log(java.lang.String s)
|
protected Action |
makeAcceptAction()
By default, if an offer is deemed acceptable, we send accept. |
static double |
percentage(double x)
|
protected void |
prepareOpponentModel()
|
static double |
round2(double x)
Rounds to two decimals |
static double |
round3(double x)
Rounds to 3 decimals |
| Methods inherited from class agents.anac.y2011.Nice_Tit_for_Tat.BilateralAgent |
|---|
chooseAction, getMyLastBid, getMySecondLastBid, getOpponentHistory, getOpponentLastBid, getRound, getUndiscountedUtility, ReceiveMessage |
| Methods inherited from class negotiator.Agent |
|---|
endSession, getAgentID, getParameterValues, getSessionNumber, getSessionsTotal, getStrategyParameters, getUniqueIdentifier, getUtility, internalInit, isUIAgent, loadSessionData, parseStrategyParameters, restartDataObjectsFolder, saveSessionData, setAgentID, setName, sleep |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NiceTitForTat()
| Method Detail |
|---|
public java.lang.String getName()
getName in class Agentpublic static java.lang.String getVersion()
public void init()
Agent
init in class BilateralAgentprotected void prepareOpponentModel()
public Bid chooseCounterBid()
BilateralAgent
chooseCounterBid in class BilateralAgentpublic Bid chooseOpeningBid()
BilateralAgent
chooseOpeningBid in class BilateralAgentpublic Bid chooseFirstCounterBid()
BilateralAgent
chooseFirstCounterBid in class BilateralAgentpublic boolean isAcceptable(Bid plannedBid)
BilateralAgent
isAcceptable in class BilateralAgentprotected Action makeAcceptAction()
BilateralAgent
makeAcceptAction in class BilateralAgentprotected static void log(java.lang.String s)
public static double round2(double x)
public static double round3(double x)
public static double percentage(double x)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||